package org.example.client;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import org.example.CreateGroupResponsePacket;
import org.example.JoinGroupResponsePacket;

public class JoinGroupResponseHandler extends SimpleChannelInboundHandler<JoinGroupResponsePacket> {

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, JoinGroupResponsePacket joinGroupResponsePacket) {
        if (joinGroupResponsePacket.isSuccess()){
            System.out.println("加入群[" + joinGroupResponsePacket.getGroupId() + "]成功.");
        }else {
            System.out.println("加入群[" + joinGroupResponsePacket.getGroupId() + "]失败.");
        }
    }
}
